home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Please Read!!
- Date: 22 Mar 1996 11:08:16 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4iutr0INNsgb@keats.ugrad.cs.ubc.ca>
- References: <4il2kq$18i1@ns2.ryerson.ca> <danpop.827237966@rscernix>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <danpop.827237966@rscernix>, Dan Pop <danpop@mail.cern.ch> wrote:
- >In <4il2kq$18i1@ns2.ryerson.ca> asaporta@jupiter.scs.Ryerson.CA (Avram Saporta) writes:
- >
- >> I am doing a paper called;
- >> 'By making C++ compatible with C, Stroustrup has "created a monster"
- >>which is neither good Object Oriented Language nor a suitable replacement
- >>for C.'
- >
- >I tend to agree with this statement. OTOH, the feature that is
- >"responsible" for C++'s success over all the other OOPL available is
- >the "compatibility" with C.
-
- It could also be that it generates fast machine code compared to other OOPL's,
- some of which require elements of interpretation at run-time.
-
- I have been ignoring C++ for the longest time, but I have recently taken it
- upon myself to read through the ARM by Stroustrup and Ellis.
-
- Many of the features of C++ are neat, but they are mostly cosmetic. I also
- believe that if they are carelessly used, they lead to code that just does
- insanely many function calls.
-
- It's neat, for instance, that objects encapsulate functions, and that an
- object's constructor and destructor is automatically called. But to me, this is
- just a syntactic/semantic nicety that offers no real advantage over using a
- structured approach. It hides a lot of information: what looks like a harmless
- ``new'' declaration could unwittingly cause the execution of code that has
- all kinds of side-effects. And even the C++ FAQ admits that operator
- overloading is mere ``syntactic sugar''.
-
- I recently read an article in a magazine published by the ACM dedicated to OO
- programming. (I will dig up the precise reference on request).
-
- A study was made of a team of experienced C programmers who had little or no
- knowledge of C++. They had to study the language for some time and were then
- given implementation tasks. I think that the given task was to write a program
- that cross-references words in a text file.
-
- The study found that OO design and implementation is difficult, rather than
- easy as the hype would lead you to believe, and doesn't necessarily yield a
- program that is simpler, and easier to understand or maintain.
-
- Only one programmer was familiar with the standard C++ object classes and he
- reused their functionality. But it turned out that his solution was actually
- more complex and took just as long to deliver as the solutions of other
- programmers who wrote code from scratch. An argument is made in the article
- that truly re-usable components are not easy to develop. From the point of
- view of a programmer who doesn't even know whether it's worthwhile to make a
- particular component general enough to be used in some unrelated project (that
- is, whether it will actually BE reused), writing reusable code is just an extra
- hassle.
-
- I'm going to dig up this article again, because it's very interesting. It is
- also published in a magazine dedicated to object-oriented design and
- programming, so I take to be a credible admission of the weaknesses of the
- paradigm from some of its very proponents.
- --
-
-